package com.fyyg.wechat.util.wechat;


public class WechatRedis extends RedisUtils {

	public static String getClientCredential(String appid) {
		return get("smile", appid, "ClientCredential");
	}

	public static void setClientCredential(String appid, String token, long expireIn) {

		del("smile", appid, "ClientCredential");

		setNx("smile", appid, "ClientCredential", token, "nx", "ex", expireIn - 200l);
	}

	public static String getJsapi(String appid) {
		return get("smile", appid, "jsapi");
	}

	public static void setJsapi(String appid, String jsapi, long expireIn) {

		del("smile", appid, "jsapi");

		setNx("smile", appid, "jsapi", jsapi, "nx", "ex", expireIn - 200l);
	}
}
